/* chimaera_user-table.h : internal interface to user table operations
 *
 * ====================================================================
 * Copyright (c) 2000-2004 CollabNet.  All rights reserved.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at http://subversion.tigris.org/license-1.html.
 * If newer versions of this license are posted there, you may use a
 * newer version instead, at your option.
 *
 * This software consists of voluntary contributions made by many
 * individuals.  For exact contribution history, see the revision
 * history and logs, available at http://subversion.tigris.org/.
 * kkndyu@gmail.com
 * ====================================================================
 */

#ifndef SVN_LIBSVN_FS_CHIMAERA_USER_TABLE_H
#define SVN_LIBSVN_FS_CHIMAERA_USER_TABLE_H

#define APU_WANT_DB
#include <apu_want.h>

#include "svn_fs.h"

#include "../fs.h"
#include "../trail.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */



int svn_fs_bdb__open_chimaera_user_table(DB **chimaerauser_p,
                                     DB_ENV *env,
                                     svn_boolean_t create);




svn_error_t *svn_fs_bdb__get_chimaera_user(chimaerauser_t **chimaerauser,
										   svn_revnum_t id,
										   svn_fs_t *fs,
                                           apr_pool_t *pool);

svn_error_t *svn_fs_bdb__get_chimaera_user_by_userid(chimaerauser_t **chimaerauser_p,
										svn_string_t *user_ID,svn_revnum_t *id, 
										svn_fs_t *fs, apr_pool_t *pool);



svn_error_t *svn_fs_bdb__put_chimaera_user(chimaerauser_t *chimaerauser_p,svn_revnum_t *rev,
										   svn_fs_t *fs, DB_TXN *txn, apr_pool_t *pool);

svn_error_t *
svn_fs_bdb__get_chimaera_user_all(chimaerauserlist_t **list,
								  apr_int32_t *num,
								  svn_fs_t *fs,apr_pool_t *pool);

svn_error_t *
svn_fs_bdb__get_chimaera_user_by_group(chimaerauserlist_t **list,
								  apr_int32_t *chimaeragroup,apr_int32_t group_num,
								  apr_int32_t group_recno,svn_fs_t *fs,apr_pool_t *pool);

svn_error_t *
svn_fs_bdb__get_chimaera_user_by_privilege(chimaerauserlist_t **list,
										   apr_int32_t *num,
										   apr_int32_t privilege,
										   svn_fs_t *fs,apr_pool_t *pool);

svn_error_t *
svn_fs_bdb__get_chimaera_user_by_recno(chimaerauserlist_t **list,
										   apr_int32_t *num,
										   apr_int32_t recno,
										   svn_fs_t *fs,apr_pool_t *pool);

svn_error_t *
svn_fs_bdb__get_chimaera_user_by_name(chimaerauserlist_t **list,
									   apr_int32_t *num,
									   char *para,
									   svn_fs_t *fs,apr_pool_t *pool);

svn_error_t *
svn_fs_bdb__del_chimaera_user(svn_revnum_t id,
							  svn_fs_t *fs,
							  DB_TXN *txn,
							  apr_pool_t *pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* SVN_LIBSVN_FS_REV_TABLE_H */

